package com.jming.yygh.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jming.yygh.model.order.OrderInfo;
import com.jming.yygh.model.order.PaymentInfo;

import java.util.Map;

/**
 * @author jming
 * @version 0.0.1
 * @date 2021/05/16
 */
public interface PaymentService extends IService<PaymentInfo> {

    /**
     * 向支付记录表添加信息
     * @return void
     */
    void savePaymentInfo(OrderInfo order, Integer status);

    /**
     * 更新支付状态
     * @return void
     */
    void paySuccess(String out_trade_no, Map<String, String> resultMap);

    /**
     * 获取支付记录
     * @param orderId
     * @param paymentType
     * @return
     */
    PaymentInfo getPaymentInfo(Long orderId, Integer paymentType);

}
